package cn.zf.spring5.test;

import cn.zf.spring5.service.UserService;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;


//@ExtendWith(SpringExtension.class) //指定单元测试框架的版本
//@ContextConfiguration("classpath:bean2.xml") //加载配置文件
@SpringJUnitConfig(locations = "classpath:bean2.xml") //复合注解，可替代上面两个注解
public class Junit5 {
    @Autowired
    private UserService userService;

    @Test
    public void test1(){
        userService.accountMoney();
    }

}
